package com.controller;

import com.api.OrderService;
import com.dto.OrderDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @description:
 * @author: sksun2
 * @create: 2023-02-10
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;


    @GetMapping("{id}")
    public OrderDTO getOrderById(@PathVariable Long id){
        OrderDTO order = orderService.getOrderById(id);
        return order;
    }

}
